var sqlite3 = require('sqlite3').verbose();
var sqlite = null;
let dbpath = path.join(`${__dirname}`, '..', '..', '..', 'db', 'jxc.db');
sqlite = new sqlite3.Database(dbpath,
	sqlite3.OPEN_READWRITE | sqlite3.OPEN_CREATE,
	function (err) {
		if (err) {
			log.error('FAIL on creating database ' + err);
		}
	});
window.database = sqlite;